package com.study;

import java.util.concurrent.ThreadPoolExecutor;

public class test {

    private test() {
        System.out.println("初始化");
    }
//    static {
////
////        t = ;
////
////    }

    public static final test t  ;
    static {
        t= new test();
    }


    public static  int i = 1;

    public static test getSingleton(){


        return t;
    }
}

class  test1{


    public static void main(String[] args) {

        try{

            //Class.forName("com.study.test");
            //ClassLoader classLoader = test1.class.getClassLoader();
            int i = test.i;
//            Thread.currentThread().getContextClassLoader().loadClass()
            test1.class.getClassLoader().loadClass("com.study.test");



//
//            test.getSingleton();
//            test.getSingleton();
//            test.getSingleton();
//            test.getSingleton();

        }catch (Exception e){
        }
    }
}

//class demo{
//    public final static int i=new Integer("100000");
//
//
//}